package com.jingli.pile.domain;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonAutoDetect(getterVisibility = JsonAutoDetect.Visibility.NONE)
public class NotifyEquipChargeStatusResult {
    @JsonProperty(value = "SuccStat")
    private int succStat;
    @JsonProperty(value = "OrderNo")
    private String orderNo;
    @JsonProperty(value = "FailReasonMsg")
    private String failReasonMsg;
    @JsonProperty(value = "FailReasonCode")
    private int failReasonCode;

    public int getSuccStat() {
        return succStat;
    }

    public void setSuccStat(int succStat) {
        this.succStat = succStat;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getFailReasonMsg() {
        return failReasonMsg;
    }

    public void setFailReasonMsg(String failReasonMsg) {
        this.failReasonMsg = failReasonMsg;
    }

    public int getFailReasonCode() {
        return failReasonCode;
    }

    public void setFailReasonCode(int failReasonCode) {
        this.failReasonCode = failReasonCode;
    }

    public static NotifyEquipChargeStatusResult sucess(String orderNo){
        NotifyEquipChargeStatusResult result = new NotifyEquipChargeStatusResult();
        result.setSuccStat(0);
        result.setOrderNo(orderNo);
        result.setFailReasonCode(0);
        result.setFailReasonMsg("");
        return result;
    }

    public static NotifyEquipChargeStatusResult failure(String orderNo){
        NotifyEquipChargeStatusResult result = new NotifyEquipChargeStatusResult();
        result.setSuccStat(1);
        result.setOrderNo(orderNo);
        result.setFailReasonCode(1);
        result.setFailReasonMsg("订单不存在");
        return result;
    }
}
